#include "stdafx.h"
#include "Board.h"
#include "Sheet.h"

Board::Board()
{

}

Board::~Board()
{

}

void Board::ShowQueue(CDC *pDC)
{
   //show data
   if(NumQueue::getInstance()->count()==0)
      return;
   
	CString str;
	int oldColor;

   oldColor =pDC->GetTextColor();
	int i,c=0;
   for(i=0; i<NumQueue::getInstance()->count(); i++)
	{
		Num num(NumQueue::getInstance()->GetAt(i));

		if(num==0xff) continue;
		str.Format("%d", num);

		//set color
      if(num.IsBlack())
         pDC->SetTextColor(RGB(200,200,60));
      else
         pDC->SetTextColor(num.GetColor());

		//set pos
      int x = m_bounding.right;
		if( num.IsBlack() ) x*=0.1;
		else if(num.IsRed()) x*=0.6;
		else x*=0.4;

		//text out
		int tsize=18;
		pDC->TextOut(x, c*tsize, str);
		if(c*tsize>m_bounding.bottom) break;

		c++;
	}
	pDC->SetTextColor(oldColor);

}